home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object= "{90BE51A2-EA01-11D2-A3B6-000000000000}#1.0#0"; "fsMsgHook5D.ocx" Begin VB.Form Form2 Caption = "fsMsgHook Demo - Multiple Windows Messages" ClientHeight = 3315 ClientLeft = 60 ClientTop = 1125 ClientWidth = 4875 LinkTopic = "Form1" ScaleHeight = 3315 ScaleWidth = 4875 Begin FishheadMsgHook.fsMsgHook fsMsgHook1 Left = 1380 Top = 1590 _ExtentX = 741 _ExtentY = 741 End Begin VB.Label Label1 BorderStyle = 1 'Fixed Single Caption = "To view the messages, please have the immediate (debug) window open." Height = 1095 Left = 750 TabIndex = 0 Top = 210 Width = 3195 End Begin VB.Menu mnu_File Caption = "&File" Begin VB.Menu mnuF_Exit Caption = "E&xit" End End Attribute VB_Name = "Form2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' ************************************************************** ' ** Created by: Fishhead Software ' ** URL: http://www.fishware.com ' ** mailto://support@fishware.com ' **------------------------------------------------------------ ' ** Project: fsMsgHook Demo ' ** Version: 1.00 ' ** Description: Multiple Windows ' ** This demo shows how fsMsgHook can handle multiple windows ' ** and their messages. To get the full benefit of this demo, ' ** the immediate window must be visible. ' **------------------------------------------------------------ ' ** Notes: July 24, 1998 Created ' ************************************************************** Option Explicit Private Sub Form_Load() Me.Caption = "First Window -" & Str$(Me.hwnd) Debug.Print "form2", Me.hwnd ' Get this form fsMsgHook1.Add Form2.hwnd Form2.Show ' Get the second form fsMsgHook1.Add Form3.hwnd Form3.Show End Sub Private Sub Form_Unload(Cancel As Integer) Unload Form3 Set Form2 = Nothing End Sub Private Sub fsMsgHook1_WndProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long, bForward As Boolean, Result As Long) ' Update immediate window Debug.Print "Hwnd:" & Str$(hwnd) & vbTab & vbTab & "uMsg:" & Hex$(uMsg) & vbTab & vbTab & "wParam:" & Hex$(wParam) & vbTab & vbTab & "lParam:" & Hex$(lParam) End Sub 'Terminate program Private Sub mnuFileExit_Click() Unload Me End Sub